The Refugees Act (No 130 of 1998) says that South Africa cannot refuse to allow a foreigner into the country or force them to return to their own country if in their own country:
Some of the people from other countries who are among us are ‘asylum seekers’ – they are people who have fled from their own countries because of political conflict or war. They are asking for refugee status in South Africa so that they can have some protection, while they wait for the time when it is safe for them to go home again. The Refugees Act of 1998 and regulations apply to refugees living in South Africa.